PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

ATSUGetAllFontVariations

Obtains font variation information from a style object.

OSStatus ATSUGetAllFontVariations (
                     ATSUStyle iStyle,
                     ItemCount iVariationCount,
                     ATSUFontVariationAxis oVariationAxes[],
                     ATSUFontVariationValue oATSUFontVariationValues[],
                     ItemCount *oActualVariationCount);
iStyle
A reference of type ATSUStyle. Pass a reference to the style object whose font variation information you want to obtain. You cannot pass NULL for this parameter.

iVariationCount
The maximum number of font variations in the style object. Typically, this is equivalent to the number of font variation axes in the ATSUFontVariationAxis array. To determine this value, see the discussion below.

oVariationAxes
An array of values of type ATSUFontVariationAxis. Before calling ATSUGetAllFontVariations, pass a pointer to memory that you have allocated for this array. If you are uncertain of how much memory to allocate, see the discussion below. On return, the array contains the previously set font variation axes in the style object.

oATSUFontVariationValues
An array of values of type ATSUFontVariationValue. Before calling ATSUGetAllFontVariations, pass a pointer to memory that you have allocated for this array. If you are uncertain about how much memory to allocate, see the discussion below. On return, the array contains the font variation values that correspond to the font variation axes passed back in the oVariationAxes array.

oActualVariationCount
A pointer to a count. On return, the actual number of font variations set in the style object. This may be greater than the value passed in the iVariationCount parameter. You cannot pass NULL for this parameter.

function result
A result code. See Result Codes.
DISCUSSION
The ATSUGetAllFontVariations function obtains an array of the variation axes and values corresponding to all previously set font variations in a style object. You can obtain a particular variation value by passing its corresponding variation axis to the function ATSUGetFontVariationValue.

The best way to use ATSUGetAllFontVariations is to call it twice:

  1. Pass a reference to the style object containing the font variation in the iStyle parameter, NULL for the oVariationAxes and oATSUFontVariationValues parameters, and 0 for the other parameters. ATSUGetAllFontVariations returns the size of the axes and value arrays in the oActualVariationCount parameter.

  2. Allocate enough space for an array of the returned size, then call the function again, passing a pointer in the oVariationAxes and oATSUFontVariationValues parameters; on return, the pointers reference arrays of variation axes and values, respectively.
VERSION NOTES
Available beginning with ATSUI 1.0.

© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)